class UserTaskBean {
  bool success;
  String message;
  int code;
  Result result;
  int timestamp;

  UserTaskBean(
      {this.success, this.message, this.code, this.result, this.timestamp});

  UserTaskBean.fromJson(Map<String, dynamic> json) {
    success = json['success'];
    message = json['message'];
    code = json['code'];
    result =
    json['result'] != null ? new Result.fromJson(json['result']) : null;
    timestamp = json['timestamp'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['success'] = this.success;
    data['message'] = this.message;
    data['code'] = this.code;
    if (this.result != null) {
      data['result'] = this.result.toJson();
    }
    data['timestamp'] = this.timestamp;
    return data;
  }
}

class Result {
  int totalTaskNumber;
  int completedTaskNumber;
  int undoneTaskNumber;

  Result(
      {this.totalTaskNumber, this.completedTaskNumber, this.undoneTaskNumber});

  Result.fromJson(Map<String, dynamic> json) {
    totalTaskNumber = json['totalTaskNumber'];
    completedTaskNumber = json['completedTaskNumber'];
    undoneTaskNumber = json['undoneTaskNumber'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['totalTaskNumber'] = this.totalTaskNumber;
    data['completedTaskNumber'] = this.completedTaskNumber;
    data['undoneTaskNumber'] = this.undoneTaskNumber;
    return data;
  }
}
